<?php
/**
 * | @author 李鹏博^life <907215837@qq.com>
 * +----------------------------------------------------------------------
 * | @copyright 2016 - 2019 HQ
 * +----------------------------------------------------------------------
 * | @version $Id: 2019/5/25 17:44 jiahe_new Goods.php 韩威兵^life $
 * +----------------------------------------------------------------------
 */

namespace app\common\common\model\oldModel\goods;

use app\common\common\model\oldModel\OldBase;
use app\common\common\model\oldModel\store\StoreExt;

class  GoodsItem extends OldBase
{
    //表名称
    protected $table = 'goods_item';
    //错误消息
    public $error = '';
    //状态值
    public $status = true;
    //其他附带信息
    public $data = [];

    /**
     * 通过where条件查询数据
     * @param $where
     * @return false|\PDOStatement|string|\think\Collection
     */
    public function allByWhere($where,$goods_field='*')
    {
        return $this->where($where)->field($goods_field)->select()->ToArray();
    }

    /**
     * @param $where
     * @return array|false|\PDOStatement|string|\think\Model
     */
    public function findByWhere($where)
    {
        return $this->where($where)->find();
    }


}